<?php use_helper("Highslide") ?>
<script type="text/javascript">
	hs.graphicsDir = 'pmHighslideJSPlugin/css/graphics/';
	hs.align = 'center';
	hs.transitions = ['expand', 'crossfade'];
	hs.outlineType = 'rounded-white';
	hs.fadeInOut = true;
	hs.dimmingOpacity = 0.75;

	// define the restraining box
	hs.useBox = false;
	hs.width = 640;
	hs.height = 480;

	// Add the controlbar
	hs.addSlideshow({
		//slideshowGroup: 'group1',
		interval: 5000,
		repeat: false,
		useControls: true,
		fixedControls: 'fit',
		overlayOptions: {
			opacity: 1,
			position: 'bottom center',
			hideOnMouseOut: true
		}
	});

</script>

<div class="title"><?php echo __('Мои фотографии')?></div>
<form  action="<?php echo url_for('@gallery_edit') ?>" method="POST" enctype="multipart/form-data">
<table>
<?php echo $form ?>
<tr>
<td colspan="2" align="right"> <input type="submit"  value="<?php echo __('Добавить фото') ?>" /> </td>
</tr>
</table> 
</form>


<?php if ($photos): ?>
<div class="thumbnails">
 <?php foreach ($photos as $m): ?>


                        <ins class="thumbnail">
                            <div class="r">
                          
                                   <?php  echo highslide(sfConfig::get('app_site_url').'/uploads/users/gallery/'.$m->getPhotoPath(), '/uploads/users/gallery/thumbnail/'.$m->getPhotoPath(), $options = array()) ?>

                                 <?php if($gallery->getPub()==1 or $gallery->getPub()==2 or sfConfig::get('app_gallery_autoapprove')==true ): ?>
                                <div class="item_name">                                
                                   <?php echo link_to(__('Удалить'),'@photo_delete?id='.$m->getId(),array('confirm'=>__('Вы уверены?')))?><br />
                                 
                                </div>
                                <?php endif ?>
                            </div>
                        </ins>


 <?php endforeach ?>
</div> 
<?php else: ?>
<?php echo __('У вас нет фотографий')?>
<?php endif ?>
